#!/usr/bin/env python


class Profile(models.Model):
	user = models.OneToOneField(User)

class Post(models.Model):
	posted_by = models.ForeignKey(User)

class Comment(models.Model):
	commented_by = models.ForeignKey(User)
	for_post = models.ForeignKey(Post)

class Like(models.Model):
	liked_by = models.ForeignKey(User)
	post = models.ForeignKey(Post)

class Origin(models.Model):
	superhero = models.ForeignKey(settings.AUTH_USER_MODEL)
	origin = models.CharField(max_length=100)

class Location(models.Model):
	latitude = models.FloatField()
	longitude = models.FloatField()
	country = models.CharField(max_length=100)

	class Meta:
		unique_together = ('latitude', 'longitude')

class Sightings(models.Model):
	superhero = models.ForeignKey(settings.AUTH_USER_MODEL)
	power = models.CharField(max_length=100)
	location = models.ForeignKey(Location)
	sighted_on = models.DateTimeField()

	class Meta:
		unique_together = ('superhero', 'power')
		